var Base = require('../base.js');
var common = require('../../utils/common.js');
var app = getApp();

Page(common.extendPage(Base, {
	data: {},

	onLoad() {
		this._init();
	},

	onPullDownRefresh() {
		this._init();
	},

	_init() {
		var _self = this;

		common.initApp({
			extSuc: function() {
				var pageId = app.config.tabBar['tabPage1'];

				_self.initMPage(pageId, function(data) {
					_self.setData(Object.assign(data, {
						dataLoaded: true
					}));
					_self.delayLoad();
					wx.stopPullDownRefresh();
				});
			},
			loginSuc: function() {
				_self.loginSuc();
			}
		});
	},


	onUnload() {
		// common.goBackPage();
	},


}));